<?php /* Smarty version 2.6.12, created on 2008-12-17 15:38:38
         compiled from admin/main/user_profiles.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'math', 'admin/main/user_profiles.tpl', 37, false),array('function', 'cycle', 'admin/main/user_profiles.tpl', 67, false),array('modifier', 'default', 'admin/main/user_profiles.tpl', 88, false),array('modifier', 'strip_tags', 'admin/main/user_profiles.tpl', 125, false),array('modifier', 'escape', 'admin/main/user_profiles.tpl', 125, false),)), $this); ?>
<?php func_load_lang($this, "admin/main/user_profiles.tpl","lbl_field_name,lbl_administrator,lbl_provider,lbl_partner,lbl_customer_at_checkout,lbl_customer,lbl_active,lbl_required,lbl_personal_information,lbl_billing_address,lbl_shipping_address,lbl_contact_information,lbl_additional_information,lbl_save,lbl_additional_fields,lbl_field_name,lbl_section,lbl_type,lbl_pos,lbl_delete_selected,txt_no_additional_fields,lbl_add_new_field,lbl_variants_for_selectbox,lbl_add_update"); ?>
<script type="text/javascript">
<!--
<?php echo '
function displayVariants(obj, objv) {
	if (!objv)
		objv = document.getElementById(\'newfield_variants\'); 
	if (!obj || !objv)
		return false;
	objv.disabled = (obj.value != \'S\');
}
'; ?>

-->
</script>

<table cellpadding="3" cellspacing="1" width="100%">

<tr>
	<td>

<form action="configuration.php" method="post">
<input type="hidden" name="option" value="<?php echo $this->_tpl_vars['option']; ?>
" />
<input type="hidden" name="mode" value="update_status" />

<table cellpadding="3" cellspacing="1" width="100%">

<tr class="TableHead">
	<td rowspan="2" width="20%" nowrap="nowrap"><?php echo $this->_tpl_vars['lng']['lbl_field_name']; ?>
</td>
<?php $_from = $this->_tpl_vars['usertypes_array']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['utype'] => $this->_tpl_vars['to_disable']):
?>
	<td align="center">
<?php if ($this->_tpl_vars['utype'] == 'A'):  echo $this->_tpl_vars['lng']['lbl_administrator'];  elseif ($this->_tpl_vars['utype'] == 'P'):  echo $this->_tpl_vars['lng']['lbl_provider'];  elseif ($this->_tpl_vars['utype'] == 'B'):  echo $this->_tpl_vars['lng']['lbl_partner'];  elseif ($this->_tpl_vars['utype'] == 'H'):  echo $this->_tpl_vars['lng']['lbl_customer_at_checkout'];  else:  echo $this->_tpl_vars['lng']['lbl_customer'];  endif; ?>
	</td>
<?php endforeach; endif; unset($_from); ?>
</tr>

<?php echo smarty_function_math(array('equation' => "floor(80/x)",'x' => $this->_tpl_vars['usertypes_array_count'],'assign' => 'col_width'), $this);?>


<tr class="TableHeadLevel2">
<?php $_from = $this->_tpl_vars['usertypes_array']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['utype'] => $this->_tpl_vars['to_disable']):
?>
	<td width="<?php echo $this->_tpl_vars['col_width']; ?>
%" align="center" nowrap="nowrap"><?php echo $this->_tpl_vars['lng']['lbl_active']; ?>
 / <?php echo $this->_tpl_vars['lng']['lbl_required']; ?>
</td>
<?php endforeach; endif; unset($_from); ?>
</tr>

<?php echo smarty_function_math(array('equation' => "x*2+1",'x' => $this->_tpl_vars['usertypes_array_count'],'assign' => 'colspan'), $this);?>


<?php $_from = $this->_tpl_vars['default_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['field'] => $this->_tpl_vars['item']):
?>

<?php if ($this->_tpl_vars['item']['field'] == 'title'):  $this->assign('part_title', $this->_tpl_vars['lng']['lbl_personal_information']);  elseif ($this->_tpl_vars['item']['field'] == 'b_title'):  $this->assign('part_title', $this->_tpl_vars['lng']['lbl_billing_address']);  elseif ($this->_tpl_vars['item']['field'] == 's_title'):  $this->assign('part_title', $this->_tpl_vars['lng']['lbl_shipping_address']);  elseif ($this->_tpl_vars['item']['field'] == 'phone'):  $this->assign('part_title', $this->_tpl_vars['lng']['lbl_contact_information']);  else:  $this->assign('part_title', "");  endif; ?>

<?php if ($this->_tpl_vars['part_title']): ?>
<tr>
	<td colspan="<?php echo $this->_tpl_vars['colspan']; ?>
"><br /><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/subheader.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['part_title'],'class' => 'grey')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>
<?php endif; ?>

<tr<?php echo smarty_function_cycle(array('values' => ", class='TableSubHead'"), $this);?>
>
	<td>
	<?php echo $this->_tpl_vars['item']['title']; ?>

	<input type="hidden" name="default_data[<?php echo $this->_tpl_vars['item']['field']; ?>
][flag]" value="Y" />
	</td>
<?php $_from = $this->_tpl_vars['usertypes_array']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['utype'] => $this->_tpl_vars['to_disable']):
?>
	<td align="center">
	<input type="checkbox"<?php if ($this->_tpl_vars['to_disable'] == ''): ?> onclick="javascript: document.getElementById('dr_<?php echo $this->_tpl_vars['item']['field']; ?>
_<?php echo $this->_tpl_vars['utype']; ?>
').disabled = !this.checked;" name="default_data[<?php echo $this->_tpl_vars['item']['field']; ?>
][avail][<?php echo $this->_tpl_vars['utype']; ?>
]"<?php endif;  if ($this->_tpl_vars['item']['avail'][$this->_tpl_vars['utype']] == 'Y'): ?> checked="checked"<?php endif;  if ($this->_tpl_vars['to_disable']): ?> disabled="disabled"<?php endif; ?> />
	&nbsp;/&nbsp;
	<input type="checkbox"<?php if ($this->_tpl_vars['to_disable'] == ''): ?> id="dr_<?php echo $this->_tpl_vars['item']['field']; ?>
_<?php echo $this->_tpl_vars['utype']; ?>
" name="default_data[<?php echo $this->_tpl_vars['item']['field']; ?>
][required][<?php echo $this->_tpl_vars['utype']; ?>
]"<?php endif;  if ($this->_tpl_vars['item']['required'][$this->_tpl_vars['utype']] == 'Y'): ?> checked="checked"<?php endif;  if ($this->_tpl_vars['to_disable'] || $this->_tpl_vars['item']['avail'][$this->_tpl_vars['utype']] != 'Y'): ?> disabled="disabled"<?php endif; ?> />
<?php if ($this->_tpl_vars['to_disable']):  if ($this->_tpl_vars['item']['required'][$this->_tpl_vars['utype']] == 'Y'): ?><input type="hidden" name="default_data[<?php echo $this->_tpl_vars['item']['field']; ?>
][required][<?php echo $this->_tpl_vars['utype']; ?>
]" value='Y' /><?php endif;  if ($this->_tpl_vars['item']['avail'][$this->_tpl_vars['utype']] == 'Y'): ?><input type="hidden" name="default_data[<?php echo $this->_tpl_vars['item']['field']; ?>
][avail][<?php echo $this->_tpl_vars['utype']; ?>
]" value='Y' /><?php endif;  endif; ?>
	</td>
<?php endforeach; endif; unset($_from); ?>
</tr>

<?php $_from = $this->_tpl_vars['additional_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
 if (( $this->_tpl_vars['item']['field'] == 'ssn' && $this->_tpl_vars['v']['section'] == 'P' ) || ( $this->_tpl_vars['item']['field'] == 'b_zipcode' && $this->_tpl_vars['v']['section'] == 'B' ) || ( $this->_tpl_vars['item']['field'] == 's_zipcode' && $this->_tpl_vars['v']['section'] == 'S' ) || ( $this->_tpl_vars['item']['field'] == 'url' && $this->_tpl_vars['v']['section'] == 'C' )): ?>
<tr<?php echo smarty_function_cycle(array('values' => ", class='TableSubHead'"), $this);?>
>
	<td><?php echo ((is_array($_tmp=@$this->_tpl_vars['v']['title'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['v']['field']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['v']['field'])); ?>
</td>
<?php $_from = $this->_tpl_vars['usertypes_array']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['utype'] => $this->_tpl_vars['to_disable']):
?>
	<td align="center">
	<input type="checkbox" onclick="javascript: document.getElementById('ar_<?php echo $this->_tpl_vars['v']['fieldid']; ?>
_<?php echo $this->_tpl_vars['utype']; ?>
').disabled = !this.checked;" name="add_data[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][avail][<?php echo $this->_tpl_vars['utype']; ?>
]"<?php if ($this->_tpl_vars['v']['avail'][$this->_tpl_vars['utype']] == 'Y'): ?> checked="checked"<?php endif; ?> />
	&nbsp;/&nbsp;
	<input id="ar_<?php echo $this->_tpl_vars['v']['fieldid']; ?>
_<?php echo $this->_tpl_vars['utype']; ?>
" type="checkbox" name="add_data[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][required][<?php echo $this->_tpl_vars['utype']; ?>
]"<?php if ($this->_tpl_vars['v']['required'][$this->_tpl_vars['utype']] == 'Y'): ?> checked="checked"<?php endif;  if ($this->_tpl_vars['v']['avail'][$this->_tpl_vars['utype']] != 'Y'): ?> disabled="disabled"<?php endif; ?> />
	</td>
<?php endforeach; endif; unset($_from); ?>
</tr>
<?php endif;  endforeach; endif; unset($_from); ?>

<?php endforeach; endif; unset($_from); ?>

<?php $_from = $this->_tpl_vars['additional_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
 if ($this->_tpl_vars['v']['section'] == 'A'):  if ($this->_tpl_vars['ai_exist'] != 'Y'): ?>
<tr>
	<td colspan="<?php echo $this->_tpl_vars['colspan']; ?>
"><br /><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/subheader.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_additional_information'],'class' => 'grey')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>
<?php $this->assign('ai_exist', 'Y');  endif; ?>
<tr<?php echo smarty_function_cycle(array('values' => ", class='TableSubHead'"), $this);?>
>
	<td><?php echo ((is_array($_tmp=@$this->_tpl_vars['v']['title'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['v']['field']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['v']['field'])); ?>
</td>
<?php $_from = $this->_tpl_vars['usertypes_array']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['utype'] => $this->_tpl_vars['to_disable']):
?>
	<td align="center">
	<input type="checkbox" onclick="javascript: document.getElementById('ar_<?php echo $this->_tpl_vars['v']['fieldid']; ?>
_<?php echo $this->_tpl_vars['utype']; ?>
').disabled = !this.checked;" name="add_data[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][avail][<?php echo $this->_tpl_vars['utype']; ?>
]"<?php if ($this->_tpl_vars['v']['avail'][$this->_tpl_vars['utype']] == 'Y'): ?> checked="checked"<?php endif; ?> />
	&nbsp;/&nbsp;
	<input id="ar_<?php echo $this->_tpl_vars['v']['fieldid']; ?>
_<?php echo $this->_tpl_vars['utype']; ?>
" type="checkbox" name="add_data[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][required][<?php echo $this->_tpl_vars['utype']; ?>
]"<?php if ($this->_tpl_vars['v']['required'][$this->_tpl_vars['utype']] == 'Y'): ?> checked="checked"<?php endif;  if ($this->_tpl_vars['v']['avail'][$this->_tpl_vars['utype']] != 'Y'): ?> disabled="disabled"<?php endif; ?> />
	</td>
<?php endforeach; endif; unset($_from); ?>
</tr>
<?php endif;  endforeach; endif; unset($_from); ?>

<tr>
	<td colspan="<?php echo $this->_tpl_vars['colspan']; ?>
"><br />
	<input type="submit" value=" <?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_save'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
 " />
	</td>
</tr>

</table>
</form>

<br /><br />

<form action="configuration.php" method="post" name="fieldsform">
<input type="hidden" name="option" value="<?php echo $this->_tpl_vars['option']; ?>
" />
<input type="hidden" name="mode" value="update_fields" />

<table cellpadding="3" cellspacing="1" width="100%">

<tr>
	<td colspan="5"><br /><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/subheader.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_additional_fields'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>

<tr class="TableHead">
	<td>&nbsp;</td>
	<td nowrap="nowrap"><?php echo $this->_tpl_vars['lng']['lbl_field_name']; ?>
</td>
	<td><?php echo $this->_tpl_vars['lng']['lbl_section']; ?>
</td>
	<td><?php echo $this->_tpl_vars['lng']['lbl_type']; ?>
</td>
	<td nowrap="nowrap"><?php echo $this->_tpl_vars['lng']['lbl_pos']; ?>
</td>
</tr>

<?php if ($this->_tpl_vars['additional_fields']):  $_from = $this->_tpl_vars['additional_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
<tr>
	<td><input type="checkbox" name="fields[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
]" value="Y" /></td>
	<td><input type="text" size="30" maxlength="100" name="update[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][field]" value="<?php echo ((is_array($_tmp=@$this->_tpl_vars['v']['title'])) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['v']['field']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['v']['field'])); ?>
" /></td>
	<td>
	<select name="update[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][section]">
    <?php $_from = $this->_tpl_vars['sections']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['s']):
?>
	    <option value="<?php echo $this->_tpl_vars['k']; ?>
"<?php if ($this->_tpl_vars['v']['section'] == $this->_tpl_vars['k']): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['s']; ?>
</option>
    <?php endforeach; endif; unset($_from); ?>
	</select>
	</td>
	<td>
	<select name="update[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][type]" onchange="javascript: displayVariants(this, document.getElementById('var_<?php echo $this->_tpl_vars['v']['fieldid']; ?>
'));">
	<?php $_from = $this->_tpl_vars['types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['t']):
?>
		<option value="<?php echo $this->_tpl_vars['k']; ?>
"<?php if ($this->_tpl_vars['v']['type'] == $this->_tpl_vars['k']): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['t']; ?>
</option>
	<?php endforeach; endif; unset($_from); ?>
	</select>
	</td>
	<td><input type="text" name="update[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][orderby]" value="<?php echo $this->_tpl_vars['v']['orderby']; ?>
" size="5" /></td>
</tr>
<?php if ($this->_tpl_vars['v']['type'] == 'S'): ?>
<tr>
    <td>&nbsp;</td>
    <td colspan="4"><input id="var_<?php echo $this->_tpl_vars['v']['fieldid']; ?>
" <?php if ($this->_tpl_vars['v']['type'] != 'S'): ?> disabled="disabled"<?php endif; ?>type="text" size="60" name="update[<?php echo $this->_tpl_vars['v']['fieldid']; ?>
][variants]" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['v']['variants'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /></td>
</tr>
<?php endif;  endforeach; endif; unset($_from); ?>

<tr>
	<td colspan="5"><br />
	<input type="button" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_delete_selected'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" onclick="javascript: submitForm(this, 'delete');" />
	</td>
</tr>

<?php else: ?>

<tr>
	<td colspan="5" align="center"><?php echo $this->_tpl_vars['lng']['txt_no_additional_fields']; ?>
</td>
</tr>

<?php endif; ?>

<tr>
	<td colspan="5"><br /><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "main/subheader.tpl", 'smarty_include_vars' => array('title' => $this->_tpl_vars['lng']['lbl_add_new_field'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?></td>
</tr>

<tr>
	<td>&nbsp;</td>
	<td><input type="text" name="newfield" size="30" maxlength="100" /></td>
	<td>
	<select name="newfield_section">
	<?php $_from = $this->_tpl_vars['sections']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
		<option value="<?php echo $this->_tpl_vars['k']; ?>
"><?php echo $this->_tpl_vars['v']; ?>
</option>
	<?php endforeach; endif; unset($_from); ?>
	</select>
	</td>
	<td>
	<select id="newfield_type" name="newfield_type" onchange="javascript: displayVariants(this);">
	<?php $_from = $this->_tpl_vars['types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
		<option value="<?php echo $this->_tpl_vars['k']; ?>
"><?php echo $this->_tpl_vars['v']; ?>
</option>
	<?php endforeach; endif; unset($_from); ?>
	</select>
	</td>
	<td><input type="text" size="5" name="newfield_orderby" /></td>
</tr>

<tr>
	<td>&nbsp;</td>
	<td colspan="4"><?php echo $this->_tpl_vars['lng']['lbl_variants_for_selectbox']; ?>
:</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td colspan="4"><input disabled="disabled" id="newfield_variants" type="text" size="60" name="newfield_variants" /></td>
</tr> 

<tr>
	<td colspan="5" class="SubmitBox"><input type="submit" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['lng']['lbl_add_update'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp, false) : smarty_modifier_strip_tags($_tmp, false)))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /></td>
</tr>

</table>
</form>

	</td>
</tr>
</table>